package com.micro.service;

import java.util.Map;

import com.micro.constant.IGeneral;
import com.micro.service.sina.SinaCommHandler;
import com.micro.util.CommunicatorResponse;

public class CommonHandler {

	public static final int TYPE_VERIFY_USER = 7;
	public static final int TYPE_FRIEND_TIME_LINE=0;

	public CommunicatorResponse request(String service, int type, Map map) {
		CommunicatorResponse commResult = new CommunicatorResponse();
		switch (type) {
		case TYPE_VERIFY_USER: {
			if (service.equals(IGeneral.SERVICE_NAME_SINA)) {
				commResult = SinaCommHandler.verifyUser(map);
			}

			break;
		}
		case TYPE_FRIEND_TIME_LINE:{
			if(service.equals(IGeneral.SERVICE_NAME_SINA)){
				commResult = SinaCommHandler.getFriendsTimeLine(map);
			}
		}

		default: {

		}
		}

		System.gc();
		return commResult;
	}
}
